package net.zoneland.knowledge.model;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import java.util.StringJoiner;

import net.zoneland.knowledge.enums.ChapterDocTypeEnum;

import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.google.common.collect.Lists;

import net.zoneland.knowledge.constant.Constants;
import net.zoneland.knowledge.enums.WorkStatusEnum;

/**
 * 智办工单信息对象.
 * @author zmq
 * @Date 2022/8/9 9:09
 */
public class WorkApplyInfo implements Serializable {
    private static final long serialVersionUID = 9057354927888666547L;
    /**
     * 主键id.
     */
    private String id;
    /**
     * 流程实例id.
     */
    private String piid;

    /**
     * 任务实例id.
     * <p>处理待办时用来传递参数，不用持久化</p>
     */
    private String tiid;
    /**
     * 工单号.
     */
    private String applyId;

    /**
     * 标题.
     */
    private String title;
    /**
     * 主送人uid.
     */
    private String receiverUid;
    /**
     * 主送人姓名.
     */
    private String receiverName;
    /**
     * 拟稿人电话.
     */
    private String creatorMobile;
    /**
     * 拟稿人部门dn.
     */
    private String creatorDeptDn;
    /**
     * 拟稿人部门名称.
     */
    private String creatorDeptName;
    /**
     * 创建时间.
     */
    @JsonFormat(pattern = Constants.DATE_TIME_FORMAT_DEFAULT, timezone = "GMT+8")
    @DateTimeFormat(pattern = Constants.DATE_TIME_FORMAT_DEFAULT)
    private Date createTime;
    /**
     * 创建时间.
     */
    @JsonFormat(pattern = Constants.DATE_TIME_FORMAT_DEFAULT, timezone = "GMT+8")
    @DateTimeFormat(pattern = Constants.DATE_TIME_FORMAT_DEFAULT)
    private Date updateTime;
    /**
     * 创建人uid.
     */
    private String creatorUid;
    /**
     * 创建人姓名.
     */
    private String creatorName;
    /**
     * 主任务名称.
     */
    private String mainTaskName;
    /**
     * 子任务信息.
     */
    private List<WorkSubTaskInfo> subTasks;
    /**
     * 当前处理人uid.
     */
    private String handlerUid;
    /**
     * 当前处理人姓名.
     */
    private String handlerName;
    /**
     * 处理结果.
     */
    private String handleResult;
    /**
     * 分配人uid.
     * <p>
     * 对应父工单的主送人中的某人.
     * </p>
     */
    private String assignUserId;
    /**
     * 分配人姓名.
     * <p>
     * 对应父工单的主送人中的某人.
     * </p>
     */
    private String assignUserName;
    /**
     * 流程处理信息.
     */
    private List<WorkApproveOpinion> workApproveOpinions;
    /**
     * 参考附件信息.
     */
    private List<WorkApplyInfoAttachment> referenceAttachments;

    /**
     * 模板附件信息.
     */
    private List<WorkApplyInfoAttachment> templateAttachments;
    /**
     * 上报附件.
     * <p>
     * 暂时要求是excel类型的附件.
     * </p>
     */
    private List<WorkApplyInfoAttachment> reportAttachments;
    /**
     * 合并报表附件信息.
     */
    private List<WorkApplyInfoAttachment> mergeAttachments;

    /**
     * 附件信息.
     * 这个是用章申请用到的附件信息，被误删的
     */
    private List<WorkApplyInfoAttachment> attachments;
    /**
     * 是否有分派.
     */
    private boolean dispatched;
    /**
     * 父工单的主键id.
     */
    private String parentId;

    /**
     * 主工单的id，指最顶层的工单id，不管分派（拆分）多少次主工单id永远不变。
     */
    private String mainWorkApplyId;

    /**
     * 工单状态.
     */
    private WorkStatusEnum status;

    /**
     * 流程类型。
     */
    private String flowType;

    /**
     * 创建人所在党支部。
     */
    private String creatorPartyOrgName;

    /**
     * 用印日期.
     */
    @JsonFormat(pattern = Constants.DATE_TIME_FORMAT_DEFAULT, timezone = "GMT+8")
    @DateTimeFormat(pattern = Constants.DATE_TIME_FORMAT_DEFAULT)
    private Date chapterDate;

    /**
     * 用印资料.
     */
    private ChapterDocTypeEnum chapterDoc;

    /**
     * 用印资料其他.
     */
    private String chapterDocOther;

    /**
     * 份数.
     */
    private Integer docNum;

    /**
     * 发往单位.
     */
    private String sendUnit;

    /**
     * 内容概要.
     */
    private String contentSummary;

    /**
     * 直属党委负责人uid.
     */
    private String partyLeaderUid;

    /**
     * 直属党委负责人姓名.
     */
    private String partyLeaderName;


    /**
     * 发起人党组织Id.
     * 用于起草提交时获取使用.
     */
    private transient String creatorPartyOrgUuid;

    /**
     * 主工单的信息.
     * 只用于工单详情显示.
     */
    private WorkApplyInfo mainWorkApplyInfo;

    /**
     * 平级办理人.
     */
    private String otherHandlerName;

    /**
     * 当前状态.
     * 只用于显示
     */
    private WorkStatusEnum currentStatus;

    /**
     * 当前处理人uid.
     */
    private String currentHandlerUid;

    /**
     * 当前处理人姓名
     */
    private String currentHandlerName;

    /**
     * 全部上报后才触发通知.
     * 2022-11-18: 领导将一个任务分派给多个人后，每个人上报都会收到通知，领导觉得太烦了，
     * 要求是否所有人上报后才触发通知改成配置，页面上随时可以修改这个配置.
     */
    private boolean notifyAfterReportAll;

    /**
     * 用章类型。
     */
    private String useSealType;

    /**
     * 抄送信息
     */
    private String copySubmit;

    /**
     * 抄送uid
     */
    private String copySubmitUid;

    /**
     * 抄送姓名
     */
    private String copySubmitName;

    /**
     * 审批意见
     */
    private String opinion;

    /**
     * 攻坚领域.
     */
    private String keyAreasToTackle;

    /**
     * 项目类别.
     */
    private String projectCategory;

    /**
     * 项目联系人编码.
     */
    private String contactsUid;

    /**
     * 联系人姓名.
     */
    private String contactsName;

    /**
     * 项目联系人电话.
     */
    private String contactsMobile;

    /**
     * 项目参与人编码列表.
     */
    private String participantsUid;

    /**
     * 项目参与人姓名.
     */
    private String participantsName;

    /**
     * 项目描述（2000字以内）.
     */
    private String description;

    /**
     * 项目责任人.
     */
    private String receiverLabel;

    /**
     * 项目参与人.
     */
    private String participantsLabel;

    /**
     * 项目联系人.
     */
    private String contactsLabel;

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public boolean isDispatched() {
        return dispatched;
    }

    /**
     * 设置 属性值.
     *
     * @param dispatched 属性值
     */
    public void setDispatched(final boolean dispatched) {
        this.dispatched = dispatched;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public List<WorkApplyInfoAttachment> getReportAttachments() {
        return reportAttachments;
    }

    /**
     * 设置 属性值.
     *
     * @param reportAttachments 属性值
     */
    public void setReportAttachments(final List<WorkApplyInfoAttachment> reportAttachments) {
        this.reportAttachments = reportAttachments;
    }

    public String getMainWorkApplyId() {
        return mainWorkApplyId;
    }

    public void setMainWorkApplyId(final String mainWorkApplyId) {
        this.mainWorkApplyId = mainWorkApplyId;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public WorkStatusEnum getStatus() {
        return status;
    }

    /**
     * 设置 属性值.
     *
     * @param status 属性值
     */
    public void setStatus(final WorkStatusEnum status) {
        this.status = status;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getHandleResult() {
        return handleResult;
    }

    /**
     * 设置 属性值.
     *
     * @param handleResult 属性值
     */
    public void setHandleResult(final String handleResult) {
        this.handleResult = handleResult;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getParentId() {
        return parentId;
    }

    /**
     * 设置 属性值.
     *
     * @param parentId 属性值
     */
    public void setParentId(final String parentId) {
        this.parentId = parentId;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getHandlerUid() {
        return handlerUid;
    }

    /**
     * 设置 属性值.
     *
     * @param handlerUid 属性值
     */
    public void setHandlerUid(final String handlerUid) {
        this.handlerUid = handlerUid;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getHandlerName() {
        return handlerName;
    }

    /**
     * 设置 属性值.
     *
     * @param handlerName 属性值
     */
    public void setHandlerName(final String handlerName) {
        this.handlerName = handlerName;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public List<WorkApplyInfoAttachment> getReferenceAttachments() {
        return Optional.ofNullable(referenceAttachments)
                .map(it -> Lists.newArrayList(it.iterator())).orElse(null);
    }

    /**
     * 设置 属性值.
     *
     * @param referenceAttachments 属性值
     */
    public void setReferenceAttachments(final List<WorkApplyInfoAttachment> referenceAttachments) {
        this.referenceAttachments = Optional.ofNullable(referenceAttachments)
                .map(it -> Lists.newArrayList(it.iterator())).orElse(null);
    }

    /**
     * 获取 模板附件.
     *
     * @return 模板附件
     */
    public List<WorkApplyInfoAttachment> getTemplateAttachments() {
        return templateAttachments;
    }

    /**
     * 设置 模板附件.
     *
     * @param templateAttachments 模板附件
     */
    public void setTemplateAttachments(List<WorkApplyInfoAttachment> templateAttachments) {
        this.templateAttachments = templateAttachments;
    }

    /**
     * 获取 合并报表附件.
     *
     * @return 合并报表附件
     */
    public List<WorkApplyInfoAttachment> getMergeAttachments() {
        return mergeAttachments;
    }

    /**
     * 设置 合并报表附件.
     *
     * @param mergeAttachments 合并报表附件
     */
    public void setMergeAttachments(List<WorkApplyInfoAttachment> mergeAttachments) {
        this.mergeAttachments = mergeAttachments;
    }

    /**
     * 获取 属性值.
     * @return 属性值
     */
    public List<WorkApplyInfoAttachment> getAttachments() {
        return Optional.ofNullable(attachments)
            .map(it -> Lists.newArrayList(it.iterator())).orElse(null);
    }
    /**
     * 设置 属性值.
     * @param attachments 属性值
     */
    public void setAttachments(final List<WorkApplyInfoAttachment> attachments) {
        this.attachments = Optional.ofNullable(attachments)
            .map(it -> Lists.newArrayList(it.iterator())).orElse(null);
    }

    /**
     * 获取 流程处理信息.
     *
     * @return 流程处理信息
     */
    public List<WorkApproveOpinion> getWorkApproveOpinions() {
        return Optional.ofNullable(workApproveOpinions)
                .map(it -> Lists.newArrayList(it.iterator())).orElse(null);
    }

    /**
     * 设置 子任务信息.
     *
     * @param workApproveOpinions 子任务信息
     */
    public void setWorkApproveOpinions(final List<WorkApproveOpinion> workApproveOpinions) {
        this.workApproveOpinions = Optional.ofNullable(workApproveOpinions)
                .map(it -> Lists.newArrayList(it.iterator())).orElse(null);
    }

    /**
     * 获取 子任务信息.
     *
     * @return 子任务信息
     */
    public List<WorkSubTaskInfo> getSubTasks() {
        return Optional.ofNullable(subTasks).map(it -> Lists.newArrayList(it.iterator())).orElse(null);
    }

    /**
     * 设置 子任务信息.
     *
     * @param subTasks 子任务信息
     */
    public void setSubTasks(final List<WorkSubTaskInfo> subTasks) {
        this.subTasks = Optional.ofNullable(subTasks).map(it -> Lists.newArrayList(it.iterator())).orElse(null);
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getId() {
        return id;
    }

    /**
     * 设置属性值.
     *
     * @param id 属性值
     */
    public void setId(final String id) {
        this.id = id;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getPiid() {
        return piid;
    }

    /**
     * 设置属性值.
     *
     * @param piid 属性值
     */
    public void setPiid(final String piid) {
        this.piid = piid;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getApplyId() {
        return applyId;
    }

    /**
     * 设置属性值.
     *
     * @param applyId 属性值
     */
    public void setApplyId(final String applyId) {
        this.applyId = applyId;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getTitle() {
        return title;
    }

    /**
     * 设置属性值.
     *
     * @param title 属性值
     */
    public void setTitle(final String title) {
        this.title = title;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getReceiverUid() {
        return receiverUid;
    }

    /**
     * 设置属性值.
     *
     * @param receiverUid 属性值
     */
    public void setReceiverUid(final String receiverUid) {
        this.receiverUid = receiverUid;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getReceiverName() {
        return receiverName;
    }

    /**
     * 设置属性值.
     *
     * @param receiverName 属性值
     */
    public void setReceiverName(final String receiverName) {
        this.receiverName = receiverName;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getCreatorMobile() {
        return creatorMobile;
    }

    /**
     * 设置属性值.
     *
     * @param creatorMobile 属性值
     */
    public void setCreatorMobile(final String creatorMobile) {
        this.creatorMobile = creatorMobile;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getCreatorDeptDn() {
        return creatorDeptDn;
    }

    /**
     * 设置属性值.
     *
     * @param creatorDeptDn 属性值
     */
    public void setCreatorDeptDn(final String creatorDeptDn) {
        this.creatorDeptDn = creatorDeptDn;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getCreatorDeptName() {
        return creatorDeptName;
    }

    /**
     * 设置属性值.
     *
     * @param creatorDeptName 属性值
     */
    public void setCreatorDeptName(final String creatorDeptName) {
        this.creatorDeptName = creatorDeptName;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public Date getCreateTime() {
        return Optional.ofNullable(createTime).map(it -> (Date) it.clone()).orElse(null);
    }

    /**
     * 设置属性值.
     *
     * @param createTime 属性值
     */
    public void setCreateTime(final Date createTime) {
        this.createTime = Optional.ofNullable(createTime).map(it -> (Date) it.clone()).orElse(null);
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getCreatorUid() {
        return creatorUid;
    }

    /**
     * 设置属性值.
     *
     * @param creatorUid 属性值
     */
    public void setCreatorUid(final String creatorUid) {
        this.creatorUid = creatorUid;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getCreatorName() {
        return creatorName;
    }

    /**
     * 设置属性值.
     *
     * @param creatorName 属性值
     */
    public void setCreatorName(final String creatorName) {
        this.creatorName = creatorName;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getMainTaskName() {
        return mainTaskName;
    }

    /**
     * 设置属性值.
     *
     * @param mainTaskName 属性值
     */
    public void setMainTaskName(final String mainTaskName) {
        this.mainTaskName = mainTaskName;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public Date getUpdateTime() {
        return Optional.ofNullable(updateTime).map(it -> (Date) it.clone()).orElse(null);
    }

    /**
     * 设置属性值.
     *
     * @param updateTime 属性值
     */
    public void setUpdateTime(final Date updateTime) {
        this.updateTime = Optional.ofNullable(updateTime).map(it -> (Date) it.clone()).orElse(null);
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getAssignUserId() {
        return assignUserId;
    }

    /**
     * 设置属性值.
     *
     * @param assignUserId 属性值
     */
    public void setAssignUserId(final String assignUserId) {
        this.assignUserId = assignUserId;
    }

    /**
     * 获取 属性值.
     *
     * @return 属性值
     */
    public String getAssignUserName() {
        return assignUserName;
    }

    /**
     * 设置属性值.
     *
     * @param assignUserName 属性值
     */
    public void setAssignUserName(final String assignUserName) {
        this.assignUserName = assignUserName;
    }

    /**
     * Gets the value of flowType.
     *
     * @return the value of flowType
     */
    public String getFlowType() {
        return flowType;
    }

    /**
     * Sets the flowType.
     *
     * @param flowType flowType
     */
    public void setFlowType(final String flowType) {
        this.flowType = flowType;
    }

    /**
     * Gets the value of creatorPartyOrgName.
     *
     * @return the value of creatorPartyOrgName
     */
    public String getCreatorPartyOrgName() {
        return creatorPartyOrgName;
    }

    /**
     * Sets the creatorPartyOrgName.
     *
     * @param creatorPartyOrgName creatorPartyOrgName
     */
    public void setCreatorPartyOrgName(final String creatorPartyOrgName) {
        this.creatorPartyOrgName = creatorPartyOrgName;
    }

    /**
     * Gets the value of chapterDate.
     *
     * @return the value of chapterDate
     */
    public Date getChapterDate() {
        return chapterDate;
    }

    /**
     * Sets the chapterDate.
     *
     * @param chapterDate chapterDate
     */
    public void setChapterDate(final Date chapterDate) {
        this.chapterDate = chapterDate;
    }

    /**
     * Gets the value of chapterDoc.
     *
     * @return the value of chapterDoc
     */
    public ChapterDocTypeEnum getChapterDoc() {
        return chapterDoc;
    }

    /**
     * Sets the chapterDoc.
     *
     * @param chapterDoc chapterDoc
     */
    public void setChapterDoc(final ChapterDocTypeEnum chapterDoc) {
        this.chapterDoc = chapterDoc;
    }

    /**
     * Gets the value of chapterDocOther.
     *
     * @return the value of chapterDocOther
     */
    public String getChapterDocOther() {
        return chapterDocOther;
    }

    /**
     * Sets the chapterDocOther.
     *
     * @param chapterDocOther chapterDocOther
     */
    public void setChapterDocOther(final String chapterDocOther) {
        this.chapterDocOther = chapterDocOther;
    }

    /**
     * Gets the value of docNum.
     *
     * @return the value of docNum
     */
    public Integer getDocNum() {
        return docNum;
    }

    /**
     * Sets the docNum.
     *
     * @param docNum docNum
     */
    public void setDocNum(final Integer docNum) {
        this.docNum = docNum;
    }

    /**
     * Gets the value of sendUnit.
     *
     * @return the value of sendUnit
     */
    public String getSendUnit() {
        return sendUnit;
    }

    /**
     * Sets the sendUnit.
     *
     * @param sendUnit sendUnit
     */
    public void setSendUnit(final String sendUnit) {
        this.sendUnit = sendUnit;
    }

    /**
     * Gets the value of contentSummary.
     *
     * @return the value of contentSummary
     */
    public String getContentSummary() {
        return contentSummary;
    }

    /**
     * Sets the contentSummary.
     *
     * @param contentSummary contentSummary
     */
    public void setContentSummary(final String contentSummary) {
        this.contentSummary = contentSummary;
    }

    /**
     * Gets the value of partyLeaderUid.
     *
     * @return the value of partyLeaderUid
     */
    public String getPartyLeaderUid() {
        return partyLeaderUid;
    }

    /**
     * Sets the partyLeaderUid.
     *
     * @param partyLeaderUid partyLeaderUid
     */
    public void setPartyLeaderUid(final String partyLeaderUid) {
        this.partyLeaderUid = partyLeaderUid;
    }

    /**
     * Gets the value of partyLeaderName.
     *
     * @return the value of partyLeaderName
     */
    public String getPartyLeaderName() {
        return partyLeaderName;
    }

    /**
     * Sets the partyLeaderName.
     *
     * @param partyLeaderName partyLeaderName
     */
    public void setPartyLeaderName(final String partyLeaderName) {
        this.partyLeaderName = partyLeaderName;
    }

    /**
     * 获取 creatorPartyOrgUuid.
     *
     * @return creatorPartyOrgUuid
     */
    public String getCreatorPartyOrgUuid() {

        return creatorPartyOrgUuid;
    }

    /**
     * 设置 creatorPartyOrgUuid.
     *
     * @param creatorPartyOrgUuid creatorPartyOrgUuid
     */
    public void setCreatorPartyOrgUuid(final String creatorPartyOrgUuid) {

        this.creatorPartyOrgUuid = creatorPartyOrgUuid;
    }

    /**
     * Gets the value of tiid.
     *
     * @return the value of tiid
     */
    public String getTiid() {
        return tiid;
    }

    /**
     * Sets the tiid.
     *
     * @param tiid tiid
     */
    public void setTiid(final String tiid) {
        this.tiid = tiid;
    }

    /**
     * 获取状态的中文名.
     * @return
     */
    public String getStatusName() {
        if (null != status) {
            return status.getName();
        }
        return StringUtils.EMPTY;
    }

    /**
     * 获取 mainWorkApplyInfo.
     *
     * @return mainWorkApplyInfo
     */
    public WorkApplyInfo getMainWorkApplyInfo() {

        return mainWorkApplyInfo;
    }

    /**
     * 设置 mainWorkApplyInfo.
     *
     * @param mainWorkApplyInfo mainWorkApplyInfo
     */
    public void setMainWorkApplyInfo(final WorkApplyInfo mainWorkApplyInfo) {

        this.mainWorkApplyInfo = mainWorkApplyInfo;
    }

    /**
     * 获取 otherHandlerName.
     *
     * @return otherHandlerName
     */
    public String getOtherHandlerName() {

        return otherHandlerName;
    }

    /**
     * 设置 otherHandlerName.
     *
     * @param otherHandlerName otherHandlerName
     */
    public void setOtherHandlerName(final String otherHandlerName) {

        this.otherHandlerName = otherHandlerName;
    }

    /**
     * 获取 currentStatus.
     *
     * @return currentStatus
     */
    public WorkStatusEnum getCurrentStatus() {
        return currentStatus;
    }

    /**
     * 设置 currentStatus.
     *
     * @param currentStatus currentStatus
     */
    public void setCurrentStatus(WorkStatusEnum currentStatus) {
        this.currentStatus = currentStatus;
    }

    /**
     * 获取 currentHandlerUid.
     *
     * @return currentHandlerUid
     */
    public String getCurrentHandlerUid() {
        return currentHandlerUid;
    }

    /**
     * 设置 currentHandlerUid.
     *
     * @param currentHandlerUid currentHandlerUid
     */
    public void setCurrentHandlerUid(String currentHandlerUid) {
        this.currentHandlerUid = currentHandlerUid;
    }

    /**
     * 获取 currentHandlerName.
     *
     * @return currentHandlerName
     */
    public String getCurrentHandlerName() {
        return currentHandlerName;
    }

    /**
     * 设置 currentHandlerName.
     *
     * @param currentHandlerName currentHandlerName
     */
    public void setCurrentHandlerName(String currentHandlerName) {
        this.currentHandlerName = currentHandlerName;
    }

    /**
     * 获取 notifyAfterReportAll.
     *
     */
    public boolean isNotifyAfterReportAll() {
        return notifyAfterReportAll;
    }

    /**
     * 设置 notifyAfterReportAll.
     *
     * @param notifyAfterReportAll notifyAfterReportAll
     */
    public void setNotifyAfterReportAll(boolean notifyAfterReportAll) {
        this.notifyAfterReportAll = notifyAfterReportAll;
    }

    /**
     * 获取当前状态名称.
     * @return 当前状态名称
     */
    public String getCurrentStatusName() {
        if (null != currentStatus) {
            return currentStatus.getName();
        }
        return StringUtils.EMPTY;
    }

    /**
     * 获取用章类型.
     * @return 用章类型
     */
    public String getUseSealType() {
        return useSealType;
    }

    /**
     * 设置用章类型.
     * @param useSealType 用章类型
     */
    public void setUseSealType(String useSealType) {
        this.useSealType = useSealType;
    }

    public String getCopySubmitUid() {
        return copySubmitUid;
    }

    public void setCopySubmitUid(String copySubmitUid) {
        this.copySubmitUid = copySubmitUid;
    }

    public String getCopySubmitName() {
        return copySubmitName;
    }

    public void setCopySubmitName(String copySubmitName) {
        this.copySubmitName = copySubmitName;
    }

    public String getCopySubmit() {
        return copySubmit;
    }

    public void setCopySubmit(String copySubmit) {
        this.copySubmit = copySubmit;
    }

    public String getOpinion() {
        return opinion;
    }

    public void setOpinion(String opinion) {
        this.opinion = opinion;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", WorkApplyInfo.class.getSimpleName() + "[", "]")
                .add("id='" + id + "'")
                .add("piid='" + piid + "'")
                .add("tiid='" + tiid + "'")
                .add("applyId='" + applyId + "'")
                .add("title='" + title + "'")
                .add("createTime=" + createTime)
                .add("updateTime=" + updateTime)
                .add("mainTaskName='" + mainTaskName + "'")
                .add("dispatched=" + dispatched)
                .add("parentId='" + parentId + "'")
                .add("status=" + status)
                .add("flowType='" + flowType + "'")
                .add("currentStatus=" + currentStatus)
                .toString();
    }

    /**
     * 获取 攻坚类型.
     *
     * @return keyAreasToTackle 攻坚类型.
     */
    public String getKeyAreasToTackle() {
        return this.keyAreasToTackle;
    }

    /**
     * 设置 攻坚类型.
     *
     * @param keyAreasToTackle 攻坚类型.
     */
    public void setKeyAreasToTackle(final String keyAreasToTackle) {
        this.keyAreasToTackle = keyAreasToTackle;
    }

    /**
     * 获取 项目类别.
     *
     * @return projectCategory 项目类别.
     */
    public String getProjectCategory() {
        return this.projectCategory;
    }

    /**
     * 设置 项目类别.
     *
     * @param projectCategory 项目类别.
     */
    public void setProjectCategory(final String projectCategory) {
        this.projectCategory = projectCategory;
    }

    /**
     * 获取 项目联系人电话.
     *
     * @return contactsMobile 项目联系人电话.
     */
    public String getContactsMobile() {
        return this.contactsMobile;
    }

    /**
     * 设置 项目联系人电话.
     *
     * @param contactsMobile 项目联系人电话.
     */
    public void setContactsMobile(final String contactsMobile) {
        this.contactsMobile = contactsMobile;
    }

    /**
     * 获取 项目描述（2000字以内）.
     *
     * @return description 项目描述（2000字以内）.
     */
    public String getDescription() {
        return this.description;
    }

    /**
     * 设置 项目描述（2000字以内）.
     *
     * @param description 项目描述（2000字以内）.
     */
    public void setDescription(final String description) {
        this.description = description;
    }

    /**
     * 获取 项目联系人编码.
     *
     * @return contactsUid 项目联系人编码.
     */
    public String getContactsUid() {
        return this.contactsUid;
    }

    /**
     * 设置 项目联系人编码.
     *
     * @param contactsUid 项目联系人编码.
     */
    public void setContactsUid(final String contactsUid) {
        this.contactsUid = contactsUid;
    }

    /**
     * 获取 项目参与人编码列表.
     *
     * @return participantsUid 项目参与人编码列表.
     */
    public String getParticipantsUid() {
        return this.participantsUid;
    }

    /**
     * 设置 项目参与人编码列表.
     *
     * @param participantsUid 项目参与人编码列表.
     */
    public void setParticipantsUid(final String participantsUid) {
        this.participantsUid = participantsUid;
    }

    /**
     * 获取 联系人姓名.
     *
     * @return contactsName 联系人姓名.
     */
    public String getContactsName() {
        return this.contactsName;
    }

    /**
     * 设置 联系人姓名.
     *
     * @param contactsName 联系人姓名.
     */
    public void setContactsName(final String contactsName) {
        this.contactsName = contactsName;
    }

    /**
     * 获取 项目参与人姓名.
     *
     * @return participantsName 项目参与人姓名.
     */
    public String getParticipantsName() {
        return this.participantsName;
    }

    /**
     * 设置 项目参与人姓名.
     *
     * @param participantsName 项目参与人姓名.
     */
    public void setParticipantsName(final String participantsName) {
        this.participantsName = participantsName;
    }

    /**
     * 获取 项目责任人.
     *
     * @return receiverLabel 项目责任人.
     */
    public String getReceiverLabel() {
        return this.receiverLabel;
    }

    /**
     * 设置 项目责任人.
     *
     * @param receiverLabel 项目责任人.
     */
    public void setReceiverLabel(final String receiverLabel) {
        this.receiverLabel = receiverLabel;
    }

    /**
     * 获取 项目参与人.
     *
     * @return participantsLabel 项目参与人.
     */
    public String getParticipantsLabel() {
        return this.participantsLabel;
    }

    /**
     * 设置 项目参与人.
     *
     * @param participantsLabel 项目参与人.
     */
    public void setParticipantsLabel(final String participantsLabel) {
        this.participantsLabel = participantsLabel;
    }

    /**
     * 获取 项目联系人.
     *
     * @return contactsLabel 项目联系人.
     */
    public String getContactsLabel() {
        return this.contactsLabel;
    }

    /**
     * 设置 项目联系人.
     *
     * @param contactsLabel 项目联系人.
     */
    public void setContactsLabel(final String contactsLabel) {
        this.contactsLabel = contactsLabel;
    }
}
